package com.example.data_save.util;

/**
 * @author: snjgm
 * data: 2022/7/19
 * description:
 */
public class R {
    private static String code;
    private static String message;
    private static Object data;
    R r = new R();
    public R(){}

    //成功
    public R successful(Object data){

        this.data = data;
        return r;
    }
    public R successful(String code,Object data){
        this.code = code ;
        this.data = data;
        return r;
    }
    public R successful(String code,String message,Object data){
        this.code = code;
        this.message = message;
        this.data = data;
        return r;
    }
    //失败
    public R failure(String code,String message){
        this.code = code;
        this.message = message;
        return r;
    }


    public static String getCode() {
        return code;
    }

    public static void setCode(String code) {
        R.code = code;
    }

    public static String getMessage() {
        return message;
    }

    public static void setMessage(String message) {
        R.message = message;
    }

    public static Object getData() {
        return data;
    }

    public static void setData(Object data) {
        R.data = data;
    }



}
